/*
 * InterpreterCommands.java - ScriptME
 * 
 * Copyright (c) 2009 Cesar Henriques <cesar at alttab.com.ar>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Based on FESI Project
 * 
 * Contributors:
 * 	Jean-Marc Lugrin - initial API and implementation
 * 	Cesar Henriques <cesar at alttab.com.ar> - J2ME Porting and Extensions
 */
package org.scriptme.ecmascript.gui;

/**
 * Define the interface to the commands of the interpreter which can be called
 * by the gui.
 */
public interface InterpreterCommands {

	/**
	 * Exit the interpreter (and EOF was detetected).
	 */
	void exit();

	/**
	 * Load and execute a file.
	 * 
	 * @param directoryName
	 *            the directory name
	 * @param fileName
	 *            the file name
	 */
	void loadFile(String directoryName, String fileName);

	/**
	 * Execute a string - return the line number of any error or 0.
	 * 
	 * @param text
	 *            The text to execute
	 * @param source
	 *            The identification of the source
	 * 
	 * @return the line number of any error if possible or 0
	 */
	int executeString(String text, String source);

	/**
	 * Display the
	 * 
	 * @about text information.
	 */
	void displayAboutText();

	/**
	 * Display the
	 * 
	 * @help text information.
	 */
	void displayHelpText();
}
